<?php
namespace haibao\cms\data\attendance;


class AttendanceDefineTmp extends \haibao\cms\data\BaseMysql{
	
	public function __construct(){
		parent::__construct('\haibao\cms\model\data\attendance\AttendanceDefineTmp');
	}
	
	public function clearAttendanceRecord($startTime,$endTime){
		$sql = 'delete from  AttendanceDefine where ClickDate>=%s and ClickDate<=%s';
		$this->query($sql,array($startTime,$endTime));
	}
	
	public function getUserAttendanceRecord($jobNum,$clickDate,$clickTime){

		$sql = "select * from AttendanceDefineTmp where JobNum=%s and ClickDate=%s and ClickTime=%s limit 1";
		return $this->query($sql,array($jobNum,$clickDate,$clickTime))->fetch_assoc();
	}
}